package com.lagou.模块四;

public class TicketPoolTest {
    public static void main(String[] args) {
        TicketPool tp = new TicketPool();
//        SaleThread st = new SaleThread(tp);
//        SaleThread st1 = new SaleThread(tp);
//        SaleThread st2 = new SaleThread(tp);
//        ReturnThread rt = new ReturnThread(tp);
//        st.start();
//        st1.start();
//        st2.start();
//        rt.start();
        SaleRunnable sr = new SaleRunnable(tp);
        ReturnRunnable rr = new ReturnRunnable(tp);
        Thread t1 = new Thread(sr);
        Thread t2 = new Thread(sr);
        Thread t3 = new Thread(sr);
        Thread t4 = new Thread(rr);
        t1.start();
        t2.start();
        t3.start();
        t4.start();

    }
}
